package cn.sxt.logistics.service.impl;

import cn.sxt.logistics.pojo.Permission;
import cn.sxt.logistics.mapper.PermissionMapper;
import cn.sxt.logistics.service.IPermissionService;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author ${author}
 * @since 2020-06-13
 */
@Service
@Transactional
public class PermissionServiceImpl extends ServiceImpl<PermissionMapper, Permission> implements IPermissionService {

    @Override
    public IPage<Map<String, Object>> selectPermissions(IPage<Map<String, Object>> page, Wrapper wrapper) {
        return baseMapper.selectPermissions(page,wrapper);
    }

    @Override
    public List<Permission> selectPermissionsByRoleId(Long roleId) {
        return baseMapper.selectPermissionsByRoleId(roleId);
    }
}
